home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <!--Stock Keeping Unit, a code for identifying products-->
- <xs:annotation>
- <xs:documentation xml:lang="en">Purchase order schema for Example.com.Copyright 2000 Example.com. All rights reserved.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType name="PurchaseOrderType">
- <xs:sequence>
- <xs:element name="shipTo" type="USAddress"></xs:element>
- <xs:element name="billTo" type="USAddress"></xs:element>
- <xs:element ref="comment" minOccurs="0"></xs:element>
- <xs:element name="items" type="Items"></xs:element>
- </xs:sequence>
- <xs:attribute name="orderDate" type="xs:date"></xs:attribute>
- </xs:complexType>
- <xs:element name="purchaseOrder" type="PurchaseOrderType"></xs:element>
- <xs:element name="comment" type="xs:string"></xs:element>
- <xs:complexType name="USAddress">
- <xs:sequence>
- <xs:element name="name" type="xs:string"></xs:element>
- <xs:element name="street" type="xs:string"></xs:element>
- <xs:element name="city" type="xs:string"></xs:element>
- <xs:element name="state" type="xs:string"></xs:element>
- <xs:element name="zip" type="xs:decimal"></xs:element>
- </xs:sequence>
- <xs:attribute name="country" type="xs:NMTOKEN" fixed="US"></xs:attribute>
- </xs:complexType>
- <xs:complexType name="Items">
- <xs:sequence>
- <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="productName" type="xs:string"></xs:element>
- <xs:element name="quantity">
- <xs:simpleType>
- <xs:restriction base="xs:positiveInteger">
- <xs:maxExclusive value="100"></xs:maxExclusive>
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- <xs:element name="USPrice" type="xs:decimal"></xs:element>
- <xs:element ref="comment" minOccurs="0"></xs:element>
- <xs:element name="shipDate" type="xs:date" minOccurs="0"></xs:element>
- </xs:sequence>
- <xs:attribute name="partNum" type="SKU" use="required"></xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:simpleType name="SKU">
- <xs:restriction base="xs:string">
- <xs:pattern value="\d{3}-[A-Z]{2}"></xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:schema>
-